package com.shop.entity;

import java.util.Objects;

//��Ʒ��
public class Goods {
    private int g_id;           //��Ʒid
    private String g_name;      //��Ʒ��
    private String g_data;      //��Ʒ���
    private String g_detail;    //��Ʒ����

    public int getG_id() {
        return g_id;
    }

    public void setG_id(int g_id) {
        this.g_id = g_id;
    }

    public String getG_name() {
        return g_name;
    }

    public void setG_name(String g_name) {
        this.g_name = g_name;
    }

    public String getG_data() {
        return g_data;
    }

    public void setG_data(String g_data) {
        this.g_data = g_data;
    }

    public String getG_detail() {
        return g_detail;
    }

    public void setG_detail(String g_detail) {
        this.g_detail = g_detail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return g_id == goods.g_id &&
                Objects.equals(g_name, goods.g_name) &&
                Objects.equals(g_data, goods.g_data) &&
                Objects.equals(g_detail, goods.g_detail);
    }

    @Override
    public int hashCode() {
        return Objects.hash(g_id, g_name, g_data, g_detail);
    }

    @Override
    public String toString() {
        return "Goods{" +
                "g_id=" + g_id +
                ", g_name='" + g_name + '\'' +
                ", g_data='" + g_data + '\'' +
                ", g_detail='" + g_detail + '\'' +
                '}';
    }

    public Goods(int g_id, String g_name, String g_data, String g_detail) {
        this.g_id = g_id;
        this.g_name = g_name;
        this.g_data = g_data;
        this.g_detail = g_detail;
    }

    public Goods() {
    }
}
